package lab02.test36;

public class Test36 {
    public static void main(String[] args) {
        Student [] arr = new Student[5];

        arr[0] = new Undergraduate("张三","本科生",90,95,100);
        arr[1] = new Undergraduate("李四","本科生",80,85,88);
        arr[2] = new Undergraduate("赵六","本科生",82,85,88);
        arr[3] = new Postgraduate("王五","研究生",75,82,87);
        arr[4] = new Postgraduate("陈七","研究生",80,82,84);

        System.out.println("姓名"+"\t\t\t"+"类型"+"\t\t\t"+"成绩");

        for (int i = 0;i < arr.length; i ++){
            System.out.println(arr[i].getName()+"\t\t\t"+arr[i].getSclass()+"\t\t\t"+arr[i].Average());
        }

    }
}
